using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using BE;


namespace BL
{
    public class BusinessLogicBase : MarshalByRefObject
    {
        public static void Publish(Exception ex)
        {
            Publish(ex, string.Empty);
        }

        protected static void Publish(Exception ex, string strLogin)
        {
            NameValueCollection additionalInfo = new NameValueCollection();
            additionalInfo.Add("Login", strLogin);
            additionalInfo.Add("GMT", DateTime.UtcNow.ToLongDateString() + " " + DateTime.UtcNow.ToLongTimeString());

            Quadrem.ExceptionManagement.ExceptionManager.Publish(ex, additionalInfo);
            throw new ManagerBusinessException(ex);
        }        
    }
}
